package org.jeecg.common;

public enum RestBaseErrorEnum {
    // 数据操作错误定义
    SUCCESS("0", "成功"),
    FAIL("-1", "失败"),
    PARAMS_ERROR("10400", "参数错误"),
    UNKNOWN_ERROR("10500", "未知错误"),
    BODY_NOT_MATCH("400","请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("401","请求的数字签名不匹配!"),
    NOT_FOUND("404", "未找到该资源!"), 
    INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
    NO_AUTHZ("501", "访问权限认证未通过!"),

    SERVER_BUSY("503","服务器正忙，请稍后再试!"),

    //8开头为gateway特有的错误
    JSON_EXCEPTION_ERROR("801", "JSON转换异常"),
    DECRYPT_EXCEPTION_ERROR("802", "密文解析异常!"),
    LOGIN_EXCEPTION_ERROR("803", "登录异常!")
    ;

    /** 错误码 */
    private String resultCode;

    /** 错误描述 */
    private String resultMsg;

    RestBaseErrorEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    public String getResultCode() {
        return resultCode;
    }

    public String getResultMsg() {
        return resultMsg;
    }

}